<template>
  <div class="search">
    <div class="top" @click="toSearchPage">
      <div class="tip">
        <span class="icon"></span>
        <span class="txt">搜索</span>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "Search",
    methods: {
      toSearchPage(){
        console.log("go to SearchPage");
        this.$router.push({
          name: 'searchPage'
        });
      }
    }
  }
</script>

<style scoped>
  .search{
    width: 100%;
    height: 40px;
  }
  .top{
    width: 90%;
    height: 40px;
    margin-left: 5%;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
  }
  .tip{
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
  }
  .icon{
    width: 12px;
    height: 12px;
    margin-right: 5px;
    border: 2px solid white;
    border-radius: 50%;
    position: relative;
  }
  .icon::after{
    content: '';
    width: 6px;
    height: 2px;
    background: white;
    border-radius: 2px;
    position: absolute;
    right: -6px;
    bottom: -4px;
    transform: rotate(40deg);
  }
  .txt{
    margin-left: 5px;
    font-size: 0.38rem;
    color: white;
  }
</style>